package me.imvc.app.entities;

// Generated 2011-12-22 13:09:31 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;

import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Entity;
import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.wltea.analyzer.lucene.IKAnalyzer;

/**
 * Users generated by hbm2java
 */
@Entity
@Indexed
@Analyzer (impl = IKAnalyzer.class )
public class Users implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6679237088934571975L;
	@DocumentId
	private Long id;
	private UserExtends userExtends;
	@Field
	@NotNull
	private String username;
	@NotNull
	private String password;
	private boolean enabled;
	private Set<Authorities> authoritieses = new HashSet<Authorities>(0);

	public Users() {
	}

	public Users(String username, String password, boolean enabled) {
		this.username = username;
		this.password = password;
		this.enabled = enabled;
	}

	public Users(UserExtends userExtends, String username, String password,
			boolean enabled, Set<Authorities> authoritieses) {
		this.userExtends = userExtends;
		this.username = username;
		this.password = password;
		this.enabled = enabled;
		this.authoritieses = authoritieses;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public UserExtends getUserExtends() {
		return this.userExtends;
	}

	public void setUserExtends(UserExtends userExtends) {
		this.userExtends = userExtends;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isEnabled() {
		return this.enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public Set<Authorities> getAuthoritieses() {
		return this.authoritieses;
	}

	public void setAuthoritieses(Set<Authorities> authoritieses) {
		this.authoritieses = authoritieses;
	}

}
